// @ts-ignore
/* eslint-disable */
import { OpenApi as request } from "@/utils/request";

/** 获取供货商品牌分页 GET /supplyChain/supplier/goods/brand/list */
export async function brandListPage(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.brandListPageParams,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponsePageRespSupplyChainSupplierBrandVo>(
    `/barter-goods/supplyChain/supplier/goods/brand/list`,
    {
      method: "GET",
      params: {
        ...params,
      },
      ...(options || {}),
    }
  );
}

/** 与平台品牌关联 POST /supplyChain/supplier/goods/brand/relation */
export async function brandRelation(
  body: API.SupplyChainSupplierBrandRelationDto,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseBoolean>(
    `/barter-goods/supplyChain/supplier/goods/brand/relation`,
    {
      method: "POST",
      headers: {
        "Content-Type": "application/json",
      },
      data: body,
      ...(options || {}),
    }
  );
}

/** 与平台分类关联 POST /supplyChain/supplier/goods/category/relation */
export async function categoryRelation(
  body: API.SupplyChainSupplierCategoryRelationDto,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseBoolean>(
    `/barter-goods/supplyChain/supplier/goods/category/relation`,
    {
      method: "POST",
      headers: {
        "Content-Type": "application/json",
      },
      data: body,
      ...(options || {}),
    }
  );
}

/** 获取供货商分类列表（树形） GET /supplyChain/supplier/goods/category/tree */
export async function categoryListTree(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.categoryListTreeParams,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseListSupplyChainSupplierGoodsCategoryVo>(
    `/barter-goods/supplyChain/supplier/goods/category/tree`,
    {
      method: "GET",
      params: {
        ...params,
      },
      ...(options || {}),
    }
  );
}
